<template>
    <van-swipe class="swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item v-for="(l, i) in banners" :key="i">
        <van-image class="vimg" :src="l.img"></van-image>
      </van-swipe-item>
    </van-swipe>
</template>

<script>
export default {
    data() {
        return {
            banners: [],
        }
    },
    methods: {
        getBanner() {
            this.$ajax.getWeiLanSwipe({}).then((res) => {
                this.banners = res;
            });
        },
    },
    mounted() {
        this.getBanner()
    }
}
</script>

<style lang="scss">

.swipe {
    height: 29.333vw;
    // margin-top: 46px;
    .vimg {
      width: 100%;
      height: 100%;
    }
  }

</style>